package com.source.tiershop.server;

import java.util.Arrays;
import java.util.List;

import javax.xml.datatype.XMLGregorianCalendar;

import webservices.framework.affilinet.types.productservice.ShopList;


import com.source.tiershop.client.ProductService;
import com.source.tiershop.shared.FieldVerifier;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

@SuppressWarnings("serial")
public class ProductServiceImpl extends RemoteServiceServlet implements ProductService {
	
	public List<String> productServer(String input) throws IllegalArgumentException {
		// Verify that the input is valid. 
//		if (!FieldVerifier.isValidName(input)) {
//			// If the input is not valid, throw an IllegalArgumentException back to
//			// the client.
//			throw new IllegalArgumentException(
//					"Name must be at least 4 characters long");
//		}

		String credentialToken = null;
//		credentialToken = AuthenticationWrapper.logon();
		
//		XMLGregorianCalendar tokenDate = AuthenticationWrapper.getExpiration(credentialToken);
	
//		ShopList shopList = ProductWrapper.getShopList();
		
		List<String> listOfShops = Arrays.asList("Sunday", "Monday",
			      "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
		
		return listOfShops;
	}
	
}